<?php

namespace app\systems\validate;
use think\Validate;
use think\Db;
class SystemMqAdd  extends Validate
{

    protected $rule = [
        'group_name'                     => 'require',
        'mq_config'                      => 'require',
        'queue_name'                     => 'require',
        'exchange_name'                  => 'require',
        'bind_key'                       => 'require',
        'queue_function'                  => 'require',
        'max_process_num'                => 'require|number',
        'max_do_ready_num'               => 'require|number'
    ];

    protected $message = [
        'group_name.require'       =>   '队列分组名称必须',
        'mq_config.require'        =>   'mq配置标识必须',
        'queue_name.require'       =>   '队列名称必须',
        'exchange_name.require'    =>   '交换机名称必须',
        'bind_key.require'         =>   '队列绑定key必须',
        'queue_function.require'    =>   '队列执行方法必须',
        'max_process_num.require'  =>   '队列最大进程数必须',
        'max_process_num.number'   =>   '队列最大进程数必须数字',
        'max_do_ready_num.require' =>   '处理数据能力必须',
        'max_do_ready_num.number'  =>   '处理数据能力必须数字'
    ];


}